const border = require('../tw-lib-base/border/props')
const nodata = require('../tw-lib-base/no-data/props')

module.exports = {
  data: {
    type: Array,
    default () {
      return [
        {
          title: '标题1',
          content: '内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内<br>容1内容1内容1内容1内容1内容1内容1内容1内容1内容内容1内容1内容1内容1内容1',
          starvalue: 4,
          html: '<span style="color:#218fff">html片段1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1内容1</span>',
          href: 'https://www.baidu.com/?'
        },
        {
          title: '标题2',
          content: '内容2',
          rightip: '<span style="padding:2px;background:green;border-radius:2px">123</span>'
        },
        {
          imgUrl: '{{$twApp.fileBaseUrl}}/图片地址',
          title: '<div style="width:100px;overflow:hidden;text-overflow:ellipsis">标题3标题3标题3标题3标题3标题3标题3标题3标题3标题3标题3标题3标题3标题3标题3标题3标题3</div>',
          html: '<span style="color:#218fff">html片段</span>',
          buttonvalue: {
            label: '下载教材',
            value: 'sss'
          },
          href: 'https://www.baidu.com/'
        },
        {
          imgUrl: '{{$twApp.fileBaseUrl}}/图片地址',
          title: '标题3',
          html: '',
          bottomtip: '<span style="color:#218fff">阅读人次</span><br>1000人次'
        },
        {
          imgUrl: '{{$twApp.fileBaseUrl}}/图片地址',
          title: '标题3',
          html: '<span style="color:#218fff">html片段</span>'
        },
        {
          imgUrl: '{{$twApp.fileBaseUrl}}/图片地址',
          title: '标题3',
          html: '<span style="color:#218fff">html片段</span>'
        },
        {
          iconCss: 'x24 xrpdf',
          mulcontent: [{
            title: '标题3333'
          }, {
            title: '标题3333'
          }]
        },
        {
          iconCss: 'x24 xrword',
          mulcontent: [{
            title: '标题3333'
          }, {
            title: '标题3333'
          }]
        }
      ]
    },
    name: '',
    filedType: 'api'
  },

  columns: {
    type: String,
    default: '2',
    name: '列数',
    nameTip: '每行显示多少项',
    filedType: 'string'
  },

  itemBg: {
    type: String,
    default: '#e2e8ee',
    name: '列表项背景',
    filedType: 'color'
  },

  itemHeight: {
    type: String,
    default: '102px',
    name: '列表项高度',
    filedType: 'string'
  },

  itemSpacing: {
    type: String,
    default: '20px',
    name: '列表项间距',
    filedType: 'string'
  },
  itemHSpacing: {
    type: String,
    default: '20px',
    name: '多列列表项垂直间距',
    filedType: 'string'
  },

  itemPadding: {
    type: String,
    default: '10px',
    name: '项内边距',
    filedType: 'string'
  },
  itemAlign: {
    type: Array,
    default: 'normal',
    name: '项内垂直方向对齐',
    filedType: 'select',
    options: [
      {
        name: 'center',
        value: 'center'
      },
      {
        name: 'normal',
        value: 'normal'
      }
    ]
  },

  isColumn: {
    type: Boolean,
    default: false,
    name: '是否垂直排列',
    filedType: 'switch',
    vif: {
      key: 'columns',
      value: ''
    }
  },

  icons: {
    type: Array,
    default () {
      return []
    },
    name: '图片列表',
    filedType: 'file',
    limit: 100,
    maxSize: 1024
  },
  iconsPosition: {
    type: Array,
    default: 'left',
    name: '图片位置',
    filedType: 'select',
    options: [
      {
        name: '左边',
        value: 'left'
      },
      {
        name: '上边',
        value: 'top'
      }
    ]
  },

  iconWidth: {
    type: String,
    default: '60px',
    name: '图标宽度',
    filedType: 'string'
  },

  iconHeight: {
    type: String,
    default: '80px',
    name: '图标高度',
    filedType: 'string'
  },
  iconBool: {
    type: Boolean,
    default: false,
    name: '显示图片边框',
    filedType: 'switch'
  },
  iconBorderColor: {
    type: String,
    default: '#ccc',
    name: '图片边框颜色',
    filedType: 'color'
  },
  iconBorderRadius: {
    type: String,
    default: '30px',
    name: '图片边框圆角',
    filedType: 'string'
  },

  fontFamily: {
    type: Array,
    default: '',
    name: '字体',
    filedType: 'select',
    options: [
      {
        name: '微软雅黑',
        value: 'Microsoft YaHei'
      },
      {
        name: '宋体',
        value: '宋体'
      },
      {
        name: '继承父元素',
        value: 'inherit'
      },
      {
        name: '液晶面板',
        value: 'digiface'
      },
      {
        name: 'Arial',
        value: 'Arial'
      },
      {
        name: 'Helvetica Neue',
        value: 'Helvetica Neue'
      },
      {
        name: 'Helvetica',
        value: 'Helvetica'
      }
    ]
  },

  titleFontSize: {
    type: String,
    default: '14px',
    name: '标题字体大小',
    filedType: 'string'
  },

  titleFontColor: {
    type: String,
    default: '#333333',
    name: '标题字体颜色',
    filedType: 'color'
  },

  familyText: {
    type: String,
    default: '',
    name: '文本字体类型',
    filedType: 'string'
  },

  desFontSize: {
    type: String,
    default: '14px',
    name: '描述字体大小',
    filedType: 'string'
  },

  desFontColor: {
    type: String,
    default: '#666666',
    name: '描述字体颜色',
    filedType: 'color'
  },

  itemBorderRadius: {
    type: String,
    default: '10px',
    name: '圆角尺寸',
    filedType: 'string'
  },

  showImg: {
    type: Boolean,
    default: true,
    name: '显示图片',
    filedType: 'switch'
  },
  showMulText: {
    type: Boolean,
    default: false,
    name: '内容允许换行',
    filedType: 'switch'
  },
  mulTextLine: {
    type: String,
    default: '0',
    name: '内容显示行数',
    filedType: 'string',
    vif: {
      key: 'showMulText',
      value: true
    }
  },

  showLine: {
    type: Boolean,
    default: true,
    name: '显示列表项边框',
    filedType: 'switch'
  },
  itemBorderColor: {
    type: String,
    default: '#ccc',
    name: '列表项边框颜色',
    filedType: 'color'
  },
  itemBorderType: {
    type: Array,
    default: 'solid',
    name: '列表项边框样式',
    filedType: 'select',
    options: [
      {
        name: '实线',
        value: 'solid'
      },
      {
        name: '虚线',
        value: 'dashed'
      },
      {
        name: '点划线',
        value: 'dotted'
      }
    ]
  },

  letterSpacing: {
    type: String,
    default: '1px',
    name: '评星字间距',
    filedType: 'string'
  },
  letterFontSize: {
    type: String,
    default: '18px',
    name: '评星字体',
    filedType: 'string'
  },

  voidcolor: {
    type: String,
    default: '#C6D1DE',
    name: '评星未选中ICON颜色',
    filedType: 'color'
  },
  showscore: {
    type: Boolean,
    default: false,
    name: '评星显示当前分数',
    filedType: 'switch'
  },
  scoreTpl: {
    type: String,
    default: '{value}分',
    name: '评星分数显示模板',
    filedType: 'string'
  },
  showtext: {
    type: Boolean,
    default: false,
    name: '评星显示辅助文字',
    filedType: 'switch'
  },
  textcolor: {
    type: String,
    default: '#333',
    name: '评星辅助文字颜色',
    filedType: 'color'
  },

  readOnly: {
    type: Boolean,
    default: true,
    name: '评星只读',
    filedType: 'switch'
  },
  disabledvoidcolor: {
    type: String,
    default: '#EFF2F7',
    name: '只读时未选中颜色',
    filedType: 'color'
  },
  allowhalf: {
    type: Boolean,
    default: false,
    name: '评星允许半选',
    filedType: 'switch'
  },
  colors: {
    type: Array,
    default () {
      return [
        '#99A9BF',
        '#F7BA2A',
        '#FF9900'
      ]
    },
    name: '评星调色板',
    nameTip: '图表按此处指定的值循环取色',
    filedType: 'list',
    subType: 'color',
    subDefault: '#2bd3bd',
    max: 3
  },
  useHighItemBg: {
    type: Boolean,
    default: false,
    name: '启用列表项高亮',
    filedType: 'switch'
  },
  itemBgColor: {
    type: String,
    default: '#e2e8ee',
    name: '高亮列表项背景',
    filedType: 'color'
  },
  itemColor: {
    type: String,
    default: '#fff',
    name: '高亮列表项字体颜色',
    filedType: 'color'
  },
  iconformat: {
    type: Array,
    default () {
      return []
    },
    name: '文件格式图标列表',
    filedType: 'file',
    limit: 100,
    maxSize: 1024
  },
  cursorStyle: {
    type: Boolean,
    default: false,
    name: '取消手形鼠标',
    filedType: 'switch'
  },

  clickFn: {
    type: Function,
    default: '',
    name: '列表项点击回调函数',
    nameTip: '函数的第一个参数即为触发点击事件的列表项',
    filedType: 'function'
  },

  ...border,
  ...nodata
}
